<include file="public/header" title="账户明细" body=""/>
<include file="public/header_nav" title="账户明细" href="{:U('Mobile/User/account')}"/>
<div class="allaccounted">
    <div class="maleri30">
        <div class="head_acc ma-to-20">
            <ul>
                <li <if condition="$type eq 'all'">class="red"</if>">
                    <a href="{:U('User/points',array('type'=>'all'))}"  data-list="1">全部</a>
                </li>
                <li <if condition="$type eq 'recharge'">class="red"</if>>
                    <a href="{:U('User/points',array('type'=>'recharge'))}"   data-list="2">充值记录</a>
                </li>
                <li  <if condition="$type eq 'points'">class="red"</if>>
                    <a href="{:U('User/points',array('type'=>'points'))}"  data-list="3">积分</a>
                </li>
                <input type="hidden" class="record" value="{$type}"/>
            </ul>
        </div>

        <if condition="$type eq 'recharge'">
            <div class="allpion">
                <foreach name="account_log" item="recharge">
                    <div class="fll_acc">
                        <ul>
                            <li>{$recharge[pay_name]}</li>
                            <li><span>充值金额: </span><span class="red">{$recharge[account]}</span></li>
                            <li>
                                <p><span>支付状态: </span>
                                    <span class="red">
                                        <if condition="$recharge[pay_status] eq 0">
                                            待支付&nbsp;&nbsp;<a href="{:U('User/recharge',array('order_id'=>$recharge[order_id]))}" class="">详情</a>
                                    <else/>
                                            已支付
                                        </if>
                                    </span>
                                </p>
                                <p class="coligh"><span>{:date('Y-m-d H:i:s',$recharge[ctime])}</span></p>
                            </li>
                        </ul>
                    </div>
                </foreach>
            </div>
        <else/>
            <div class="allpion">
                <foreach name="account_log" item="v">
                    <div class="fll_acc">
                        <ul>
                            <li>{$v[desc]}</li>
                            <li>
                                <span>余额：</span><span class="red">{$v[user_money]}</span></li>
                            <li>
                                <p>
                                    <span>积分：</span><span class="red">{$v[pay_points]}</span>
                                </p>
                                <p class="coligh">
                                    <span>{:date('Y-m-d H:i:s',$v[change_time])}</span>
                                </p>
                            </li>
                        </ul>
                    </div>
                </foreach>
            </div>
        </if>
        <empty name="account_log">
            <div style="font-size:.24rem;text-align: center;color:#888;padding:.25rem .24rem .4rem; clear:both">
                <span>暂无数据</span>
            </div>
        </empty>
    </div>
</div>
<script type="text/javascript" src="__STATIC__/js/sourch_submit.js"></script>
<script type="text/javascript">
//    var record=$('.record').val();   //获取记录类型
    //加载更多记录
    var page = 1;
    function ajax_sourch_submit()
    {
        ++page;
        $.ajax({
            type : "GET",
            url:"/index.php?m=Mobile&c=User&a=points&is_ajax=1&type={$type}&p="+page,//+tab,
    //			url:"{:U('Mobile/User/points',null,'')}/is_ajax/1/p/"+page,//+tab,
    //			data : $('#filter_form').serialize(),// 你的formid 搜索表单 序列化提交
            success: function(data)
            {
                if($.trim(data) == '') {
                    $('#getmore').hide();
                }else{
                    $(".allpion").append(data);
                }
            }
        });
    }
</script>
</body>
</html>